#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main()
{
    close(0);
    int fd = open("log.txt", O_WRONLY|O_CREAT, 0666);
    
    write(fd, "hello fdceshi\n", 10);
    printf("%d\n", fd);
   // printf("%d\n",stdin->_fileno);
   // printf("%d\n", stdout->_fileno);
   // printf("%d\n", stderr->_fileno);
  // fprintf(stdout, "%s", "hello fprintf\n");
  // write(1, "hello write\n", strlen("hello write") + 1);
    return 0;
}
